//
//  ParseUrlManager.m
//
//
//  
//  Copyright (c) 2016年 qianfeng. All rights reserved.
//

#import "ParseUrlManager.h"
#import "AFNetworking.h"

@implementation ParseUrlManager

+(void)ParseDataWithUrl:(NSString *)url success:(SuccessBlock)succeblock fail:(ErrorBlock)errorblock{
    
    AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    [manager GET:url parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
        
        succeblock(responseObject);
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        
        errorblock(error);
    }];
}

@end
